package com.me.batm.models;

import com.badlogic.gdx.math.Vector2;

public class LifeAura extends Aura {
	
	private float lifeFactor;
	private boolean positive;
	public LifeAura (int direction, float x, float y, float width, float height, Vector2 speed,
						float radio,  float velocity, float lifeFactor, boolean positive) {
		super (direction, x, y , width, height, speed, velocity, radio);
		this.lifeFactor = lifeFactor;
		this.positive = positive;
	}
	
	@Override
	public void applyEffectOverPlayer(Player player) {
		if (!positive){
			player.lifeFactor *= lifeFactor;
		} else {
			player.lifeFactor /= -lifeFactor*4;
		}
	}
	@Override
	public void removeEffectOverPlayer(Player player) {
		if (!positive) {
			player.lifeFactor /= lifeFactor;
		} else {
			player.lifeFactor /= -lifeFactor*4;
		}
	}

}
